package com.atguigu.controller;

import com.atguigu.entities.CustomerMixInfo;
import com.atguigu.service.CustomerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: shenhao
 * @CreatTime: 2024/10/28 18:33
 * @Version: 1.0
 */
@RestController
@Slf4j
public class CustomerController {
    @Autowired
    private CustomerService customerService;
    @GetMapping(value = "/customer/findv1")
    public CustomerMixInfo findCustomer(){
        return customerService.findCustomer();
    }

    @GetMapping("/customer/findv2")
    public CustomerMixInfo findCustomerByCompletableFuture(){
        return customerService.findCustomerByCompletableFuture();
    }
}
